﻿{extend name="public:base" /}

{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <a href="{:url('doStudent')}" class="btn btn-primary btn-lg">新增</a>
                </div>

                <div class="ibox-content">
                    <div class="row search-form">
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="输入手机号搜索" type="text" class="form-control form-control-lg" name="mobile" value="{:input('mobile')}">
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="选择开始日期搜索" type="text" class="form-control form-control-lg screen-date" name="start_time" value="{:input('start_time')}" readonly="" lay-key="1">
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="选择结束日期搜索" type="text" class="form-control form-control-lg screen-date" name="end_time" value="{:input('end_time')}" readonly="" lay-key="1">
                            </div>
                        </div>
                        <div class="col-sm-4 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-striped">
                            <tr>
                                <th>ID</th>
                                <th>昵称</th>
                                <th>头像</th>
                                <th>手机号</th>
                                <th>老师</th>
                                <th>注册时间</th>
                                <th>操作</th>
                            </tr>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.username}</td>
                                <td><img src="{$vo.avatar|doAvatar}" style="width: 100px;height: 100px; object-fit: cover" /></td>
                                <td>{$vo.mobile}</td>
                                <td>{$vo.teacher_username}</td>
                                <td>{$vo.create_time|timeFormat}</td>
                                <td>
                                    <a href="{:url(doStudent, ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-edit"></i> 编辑 </a>
                                    <a href="{:url(studentTopicLog, ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-news"></i> 做题明细 </a>
                                    <a href="{:url(studentCourseLog, ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-news"></i> 学习明细 </a>
                                    <a href="{:url(delStudent, ['id' => $vo.id])}" class="btn btn-white btn-sm ajax-del"><i class="iconfont icon-trash"></i> 删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}


{block name='js'}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.screen-date' //指定元素
    });
</script>
{/block}
